package com.zj.ckproxy.mapper;

import com.zj.baseproxy.model.Page;
import com.zj.baseproxy.model.PageInfo;
import com.zj.ckproxy.annotation.CkScan;
import com.zj.ckproxy.entity.CkTestDo;
import com.zj.ckproxy.entity.InFinancingInformationRequest;
import com.zj.ckproxy.entity.InFinancingInformationResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author arthur_zhou
 * @date 2024/2/27 18:09
 */
@CkScan
public interface MyXmlMapper {
    /**
     * 检测名称是否存在
     *
     * @param name
     * @param inventoryId
     * @param userId
     * @param tenantName
     * @return
     */
    int isExist(String name, @Param("inventoryId") Long inventoryId,
                    @Param("userId") String userId, @Param("tenantName") String tenantName);

    /**
     * 查询id是否存在
     *
     * @param inventoryId
     * @param userId
     * @param tenantName
     * @return
     */
    Integer isExistId(@Param("inventoryId") Long inventoryId, @Param("userId") String userId, @Param("tenantName") String tenantName);

    CkTestDo getOne();

    List<CkTestDo> getList(@Param("inventoryId") Long inventoryId);

    Page<CkTestDo> getPage(PageInfo pageInfo);

    Page<CkTestDo> getPageNew(CkTestDo ckTestDo);

    Page<InFinancingInformationResponse> getInPage(@Param("pageInfo") PageInfo pageInfo, @Param("request") InFinancingInformationRequest request);
}
